<?php /* SVN: $Id: $ */ ?>
<div class="projectCategories index js-response">
<div class="page-count-block clearfix">
	    <div class="grid_left">
	      <?php echo $this->element('paging_counter'); ?>
		</div>
        <div class="add-block grid_right">
	   <?php echo $this->Html->link(__l('Add'),array('controller'=>'project_categories', 'action'=>'add'),array('class' => 'add', 'title' => __l('Add New Category')));?>
      </div>
  </div>

<table class="list">
    <tr>
        <th class="actions"><?php echo __l('Actions');?></th>
        <th class="dl"><div class="js-pagination"><?php echo $this->Paginator->sort(__l('Name'), 'name');?></div></th>
        <th><div class="js-pagination"><?php echo $this->Paginator->sort(__l('Projects'), 'project_count');?></div></th>
    </tr>
<?php
if (!empty($projectCategories)):

$i = 0;
foreach ($projectCategories as $projectCategory):
	$class = null;
	if ($i++ % 2 == 0) {
		$class = ' class="altrow"';
	}
?>
	<tr<?php echo $class;?>>
		<td class="actions dl">
            <div class="action-block">
                <span class="action-information-block">
                    <span class="action-left-block">&nbsp;&nbsp;</span>
                        <span class="action-center-block">
                            <span class="action-info">
                                <?php echo __l('Action');?>
                             </span>
                        </span>
                    </span>
                    <div class="action-inner-block">
                    <div class="action-inner-left-block">
                        <ul class="action-link clearfix">
        <li><?php echo $this->Html->link(__l('Edit'), array('action' => 'edit', $projectCategory['ProjectCategory']['id']), array('class' => 'edit js-edit', 'title' => __l('Edit')));?></li>
        <li><?php echo $this->Html->link(__l('Delete'), array('action' => 'delete', $projectCategory['ProjectCategory']['id']), array('class' => 'delete js-delete', 'title' => __l('Delete')));?></li>
                      		 </ul>
    					</div>
    					<div class="action-bottom-block"></div>
    				  </div>
              </div>
        </td>
		<td class="dl"><?php echo $this->Html->cText($projectCategory['ProjectCategory']['name']);?></td>
		 <td><?php echo $this->Html->link($this->Html->cInt(count($projectCategory['Project'])), array('controller' => 'projects', 'action' => 'index', 'project_category_id' => $projectCategory['ProjectCategory']['id']), array('escape' => false));?></td>
	</tr>
<?php
    endforeach;
else:
?>
	<tr>
		<td colspan="7" class="notice"><?php echo __l('No Project Categories available');?></td>
	</tr>
<?php
endif;
?>
</table>

<?php
if (!empty($projectCategories)) : ?> 
   <div><?php  echo $this->element('paging_links'); ?></div>
<?php endif; ?>
</div>
